<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('修改账户流水')" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-flow-edit" th:object="${fantasyBankAccountFlow}">
            <input name="id" th:field="*{id}" type="hidden">
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">用户id：</label>
                <div class="col-sm-8">
                    <input name="userId" th:field="*{userId}" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">银行账户id：</label>
                <div class="col-sm-8">
                    <input name="bankAccountId" th:field="*{bankAccountId}" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">类型：</label>
                <div class="col-sm-8">
                    <select name="flowType" class="form-control m-b" th:with="type=${@dict.getType('flow_type')}">
                        <option value="">所有</option>
                        <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"
                                th:selected="${fantasyBankAccountFlow.flowType == dict.dictValue}"></option>
                    </select>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">金额：</label>
                <div class="col-sm-8">
                    <input name="amount" th:field="*{amount}" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">来源类型：</label>
                <div class="col-sm-8">
                    <select name="fromType" class="form-control m-b" required th:with="type=${@dict.getType('trader_type')}">
                        <option value="">所有</option>
                        <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"
                                th:selected="${fantasyBankAccountFlow.fromType == dict.dictValue}"></option>
                    </select>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">转出方：</label>
                <div class="col-sm-8">
                    <input name="fromId" th:field="*{fromId}" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">目标类型：</label>
                <div class="col-sm-8">
                    <select name="toType" class="form-control m-b" required th:with="type=${@dict.getType('trader_type')}">
                        <option value="">所有</option>
                        <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"
                                th:selected="${fantasyBankAccountFlow.toType == dict.dictValue}"></option>
                    </select>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">转入方：</label>
                <div class="col-sm-8">
                    <input name="toId" th:field="*{toId}" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">费用：</label>
                <div class="col-sm-8">
                    <input name="charge" th:field="*{charge}" class="form-control" type="text">
                </div>
            </div>
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <script type="text/javascript">
        var prefix = ctx + "fantasy/fantasyBankAccountFlow";
        $("#form-flow-edit").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/edit", $('#form-flow-edit').serialize());
            }
        }
    </script>
</body>
</html>